package com.qingke.mybatis;

import org.apache.ibatis.session.SqlSession;

import com.qingke.mybatis.mapping.BlogMapper;
import com.qingke.pojo.Blog;
import com.qingke.pojo.User;

public class App6 {

	public static void main(String[] args) {
		
		SqlSession session = SessionManager.getInstance().getSession();
		
		String sql = "com.qingke.mybatis.mapping.userMapper.selectById2";
		User user = session.selectOne(sql, 1);
		System.out.println(user.getBlogs().size());
		session.commit();
		session.close();
	}
	
}
